
package com.ttomato.game.mrnom;

import java.util.List;

import com.ttomato.game.framework.Game;
import com.ttomato.game.framework.Graphics;
import com.ttomato.game.framework.Input.TouchEvent;
import com.ttomato.game.framework.Screen;

public class HelpScreen extends Screen {

    public HelpScreen(Game game) {
        super(game);
    }

    @Override
    public void update(float deltaTime) {
        List<TouchEvent> touchEvents = mGame.getInput().getTouchEvents();
        int len = touchEvents.size();

        for (int i = 0; i < len; i++) {
            TouchEvent event = touchEvents.get(i);

            if (TouchEvent.TOUCH_UP == event.type) {
                if (event.x > 256 && event.y > 416) {
                    mGame.setScreen(null);
                    if (Settings.soundEnabled) {
                        Assets.click.play(1);
                    }
                    return;
                }
            }
        }
    }

    @Override
    public void present(float deltaTime) {
        Graphics g = mGame.getGraphics();
        g.drawPixmap(Assets.background, 0, 0);
        g.drawPixmap(Assets.help1, 64, 100);
        g.drawPixmap(Assets.buttons, 256, 416, 0, 64, 64, 64);
    }

    @Override
    public void pause() {
        // TODO Auto-generated method stub

    }

    @Override
    public void resume() {
        // TODO Auto-generated method stub

    }

    @Override
    public void dispose() {
        // TODO Auto-generated method stub

    }

}
